package day240515.e1;

public class StudentAgeComparator implements MyComparator{

    @Override
    public int compare(Object o1,Object o2) {
        Student s1 = (Student) o1;
        Student s2 = (Student) o2;
        if (s1.age == s2.age) return 0;
        else return s1.age - s2.age > 0 ? 1 : 0;
    }
}
